package online.heycm.rbac.common.utils;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import online.heycm.rbac.common.entity.PageReq;

/**
 * @author hey
 * @version 1.0
 * @date 2024/1/12 16:16
 */
public class PageHelper {

    private PageHelper() {
    }

    public static <T> IPage<T> getPage(PageReq req) {
        return new Page<>(req.getPage(), req.getSize());
    }

    public static <T> IPage<T> getPage(int page, int size) {
        return new Page<>(page, size);
    }

}
